package com.atguigu01.create.exer1;

/**
 * ClassName: EvenNumber
 * Package: com.atguigu01.create.exer1
 * Description:
 *
 * @Author BuTang
 * @Create 2023/5/13 22:26
 * @Version 1.0
 */
public class EvenNumber extends Thread{

    @Override
    public void run() {
        for (int i = 0; i <= 100 ; i++) {

            if ( i % 2 == 0 ) {
                System.out.println(Thread.currentThread().getName()+":"+ i);
            }
        }
    }
}
class EvenNumberTest{
    public static void main(String[] args) {
        EvenNumber e = new EvenNumber();
        e.start();

        new Thread(){
            @Override
            public void run() {
                for (int i = 0; i <= 100 ; i++) {

                    if ( !(i % 2 == 0) ) {
                        System.out.println(Thread.currentThread().getName()+":"+ i);
                    }
                }
            }
        }.start();
    }
}